﻿using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace NetCoreDemo.Common.Extension
{
    public static class HtmlHelperExtension
    {
        public static string LayerMsg(this IHtmlHelper htmlHelper, string value)
        {
            return @"<script>layui.use(['layer'],function(){var layer=layui.layer;layer.msg('" + value + "')})</script>";
        }
        public static string Msg(this IHtmlHelper htmlHelper, string value)
        {
            return string.Format(@"alert('" + value + "')");
        }
    }
}
